home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Periodicals / develop / develop 3 code / Meet PrGeneral / PrGeneralPlay.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-06  |  5.1 KB  |  138 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    PrGeneralPlay.h    - this file defines all of the values used by PrGeneralPlay
  4. #
  5. #    PrGeneralPlay is an example application that demonstrates the use
  6. #     of PrGeneral's opcodes: GetRslData, SetRsl, GetRotn, DraftBits, and 
  7. #   NoDraftBits.  For complete details about the functionality of this
  8. #    application, see the header at the top of the PrGeneralPlayPrint.c file.
  9. #
  10. # ------------------------------------------------------------------------------  
  11. #
  12. #    Versions:   1.00                    June 1, 1990
  13. #
  14. #    Components: PrGeneralPlay.c            June 1, 1990
  15. #                PrGeneralPlayPrint.c    June 1, 1990
  16. #                PrGeneralPlay.h            June 1, 1990
  17. #                PrGeneralPlay.r            June 1, 1990
  18. #
  19. #
  20. #    Apple Macintosh Developer Technical Support
  21. #    Copyright © 1990 Apple Computer, Inc.
  22. #    All rights reserved.
  23. #
  24. ------------------------------------------------------------------------------*/
  25.  
  26. #define kMinSize    896                /* application's minimum size (in K) */
  27.  
  28. #define kPrefSize    1024            /* application's preferred size (in K) */
  29.  
  30. #define    rMenuBar            128        /* application's menu bar */
  31. #define    rAboutAlert            128        /* about alert */
  32. #define    rUserAlert            129        /* error user alert */
  33. #define    rLandscapeAlert        130        /* landscape orientation set user alert */
  34. #define    r32BitQDAlert       131     /* 32-bit QD required alert */
  35. #define    rNOPrGeneralAlert   132     /* the NOPrGeneral alert */
  36.  
  37. #define MacScreenRes        72        /* The resolution of the Mac screen */            
  38. #define    FontSize            12
  39. #define    VertMargin            40
  40.  
  41. /* kSysEnvironsVersion is passed to SysEnvirons to tell it which version of the
  42.    SysEnvRec we understand. */
  43.  
  44. #define    kSysEnvironsVersion        1
  45.  
  46. /* kOSEvent is the event number of the suspend/resume and mouse-moved events sent
  47.    by MultiFinder. Once we determine that an event is an osEvent, we look at the
  48.    high byte of the message sent to determine which kind it is. To differentiate
  49.    suspend and resume events we check the resumeMask bit. */
  50.  
  51. #define    kOSEvent                app4Evt    /* event used by MultiFinder */
  52. #define    kSuspendResumeMessage    1        /* high byte of suspend/resume event message */
  53. #define    kResumeMask                1        /* bit of message field for resume vs. suspend */
  54. #define    kMouseMovedMessage        0xFA    /* high byte of mouse-moved event message */
  55. #define    kNoEvents                0        /* no events mask */
  56.  
  57. /* The following constants are used to identify menus and their items. The menu IDs
  58.    have an "m" prefix and the item numbers within each menu have an "i" prefix. */
  59.  
  60. #define    mApple                    128        /* Apple menu */
  61. #define    iAbout                    1
  62.  
  63. #define    mFile                    129        /* File menu */
  64. #define    iNew                    1
  65. #define iOpen                    2
  66. #define    iClose                    4
  67. #define iSave                    5
  68. #define    iSaveAs                    6
  69. #define iRevert                    7
  70. #define    iPageSetup                9
  71. #define    iPrint                    10
  72. #define    iQuit                    12
  73.  
  74. #define    mEdit                    130        /* Edit menu */
  75. #define    iUndo                    1
  76. #define    iCut                    3
  77. #define    iCopy                    4
  78. #define    iPaste                    5
  79. #define    iClear                    6
  80.  
  81. #define    mPrGeneral                131        /* PrGeneral menu */
  82. #define iTurnHighResOFF            1
  83. #define iUseDraftBits            2
  84. #define iCheckForLandscape        3
  85.  
  86. /*    1.01 - kTopLeft - This is for positioning the Disk Initialization dialogs. */
  87.  
  88. #define kDITop                    0x0050
  89. #define kDILeft                    0x0070
  90.  
  91. /*    1.01 - kMinHeap - This is the minimum result from the following
  92.     equation:
  93.         
  94.         ORD(GetApplLimit) - ORD(ApplicZone)
  95.         
  96.     for the application to run. It will insure that enough memory will
  97.     be around for reasonable-sized scraps, FKEYs, etc. to exist with the
  98.     application, and still give the application some 'breathing room'.
  99.     To derive this number, we ran under a MultiFinder partition that was
  100.     our requested minimum size, as given in the 'SIZE' resource. */
  101.      
  102. #define kMinHeap                21 * 1024
  103.     
  104. /*    1.01 - kMinSpace - This is the minimum result from PurgeSpace, when called
  105.     at initialization time, for the application to run. This number acts
  106.     as a double-check to insure that there really is enough memory for the
  107.     application to run, including what has been taken up already by
  108.     pre-loaded resources, the scrap, code, and other sundry memory blocks. */
  109.      
  110. #define kMinSpace                8 * 1024
  111.  
  112. /* kExtremeNeg and kExtremePos are used to set up wide open rectangles and regions. */
  113.  
  114. #define kExtremeNeg                -32768
  115. #define kExtremePos                32767 - 1 /* required to address an old region bug */
  116.  
  117. /* these #defines are used to set enable/disable flags of a menu */
  118.  
  119. #define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  120. #define NoItems        0b0000000000000000000000000000000
  121. #define MenuItem1    0b0000000000000000000000000000001
  122. #define MenuItem2    0b0000000000000000000000000000010
  123. #define MenuItem3    0b0000000000000000000000000000100
  124. #define MenuItem4    0b0000000000000000000000000001000
  125. #define MenuItem5    0b0000000000000000000000000010000
  126. #define MenuItem6    0b0000000000000000000000000100000
  127. #define MenuItem7    0b0000000000000000000000001000000
  128. #define MenuItem8    0b0000000000000000000000010000000
  129. #define MenuItem9    0b0000000000000000000000100000000
  130. #define MenuItem10    0b0000000000000000000001000000000
  131. #define MenuItem11    0b0000000000000000000010000000000
  132. #define MenuItem12    0b0000000000000000000100000000000
  133.  
  134. /*     This error should be defined in Printing.h, but isn't (apparently
  135.     because all of Apple's drivers support PrGeneral, so this error will
  136.     never occur). */
  137.     
  138. #define OpNotImpl    2